package jxc.base.db;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;

import org.hibernate.HibernateException;
import org.hibernate.connection.ConnectionProvider;

public class HibernateProvider implements ConnectionProvider {

	@Override
	public void close() throws HibernateException {
		//do nothing
	}

	@Override
	public void closeConnection(Connection arg0) throws SQLException {
		jxc.base.db.ConnectionProvider.returnConnection(arg0);
	}

	@Override
	public void configure(Properties arg0) throws HibernateException {
		// do nothing
	}

	@Override
	public Connection getConnection() throws SQLException {
		return jxc.base.db.ConnectionProvider.getConnection();
	}

	@Override
	public boolean supportsAggressiveRelease() {
		//do nothing
		return false;
	}

}
